package com.show.mapper;


import com.show.pojo.Trainee;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * @author 绛河
 */


public interface TraineeMapper {
    List<Trainee> searchAll();

    Integer searchBefore(@Param("localDateTime") LocalDateTime localDateTime);

    Integer searchByTerm(@Param("term") Integer term);

    @MapKey("id")
    List<Map<String, Object>> searchByYear();

    @MapKey("id")
    List<Map<String, Object>> searchByMonth(@Param("year") Integer year);


    Integer saveAll(@Param("trainees") List<Trainee> trainees);


    Integer saveTrainee(@Param("trainee") Trainee trainee);
}
